﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ModularFixture.CUiMFSearchConstraintsDlg
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using C1.Win.C1FlexGrid;
using EngineeringInternalExtension;
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using System.Xml;
using Tecnomatix.Engineering;
using Tecnomatix.Engineering.Ui;
using Tecnomatix.Engineering.Ui48;


namespace DnProcessSimulateCommands.ModularFixture;

internal class CUiMFSearchConstraintsDlg : TxForm
{
  internal const string XML_FILE_NAME = "MFSearchFields.xml";
  private const string MODFIX_NODE = "ModularFixture";
  private const string OBJECT_NODE = "object";
  private const string NAME_ATTR = "name";
  private const string DISPLAY_NAME_ATTR = "displayname";
  private const string ATTRIBUTE_NODE = "attribute";
  private const string TYPE_ATTR = "type";
  private const int OBJECT_TYPE_COLUMN = 0;
  private const int ATTRIBUTE_COLUMN = 1;
  private const int OPERATOR_COLUMN = 2;
  private const int VALUE_COLUMN = 3;
  private const string NORMAL_STYLE = "Normal";
  private const string OBJECT_TYPE_STYLE = "ObjectTypeStyle";
  private const string STRING_VALUE_STYLE = "StringValueStyle";
  private const string NUMBER_VALUE_STYLE = "NumberValueStyle";
  private const string DATE_VALUE_STYLE = "DateValueStyle";
  private const string STRING_OPERATOR_STYLE = "StringOperatorStyle";
  private const string NUMBER_OPERATOR_STYLE = "NumberOperatorStyle";
  private const string DATE_OPERATOR_STYLE = "DateOperatorStyle";
  private ArrayList m_objectTypes;
  private ArrayList m_attributes;
  private ArrayList m_attributesTypes;
  private ArrayList m_attributesDisplayNames;
  private ArrayList m_searchConditionsContained;
  private ArrayList m_searchConditionsNotContained;
  private string m_solutionContainsOperator;
  private string m_solutionDoesntContainsOperator;
  private IContainer components;
  private GroupBox groupBox1;
  private Label label1;
  private GroupBox groupBox2;
  private Label label2;
  private Button m_ok;
  private Button m_cancel;
  private RadioButton m_solutionContainsAndRadio;
  private RadioButton m_solutionContainsOrRadio;
  private TxFlexGrid m_solutionDoesntContainConditionsGrid;
  private RadioButton m_solutionDoesntContainsAndRadio;
  private RadioButton m_solutionDoesntContainsOrRadio;
  private TxFlexGrid m_solutionContainsConditionsGrid;

  internal CUiMFSearchConstraintsDlg(
    ref ArrayList searchConditionsContained,
    ref ArrayList searchConditionsNotContained,
    string solutionContainsOperator,
    string solutionDoesntContainsOperator)
  {
    this.InitializeComponent();
    this.m_objectTypes = new ArrayList();
    this.m_attributes = new ArrayList();
    this.m_attributesTypes = new ArrayList();
    this.m_attributesDisplayNames = new ArrayList();
    this.m_searchConditionsContained = searchConditionsContained;
    this.m_searchConditionsNotContained = searchConditionsNotContained;
    if (solutionContainsOperator == "OR")
    {
      this.m_solutionContainsOrRadio.Checked = true;
      this.m_solutionContainsOperator = "OR";
    }
    else
    {
      this.m_solutionContainsAndRadio.Checked = true;
      this.m_solutionContainsOperator = "AND";
    }
    if (solutionDoesntContainsOperator == "OR")
    {
      this.m_solutionDoesntContainsOrRadio.Checked = true;
      this.m_solutionDoesntContainsOperator = "OR";
    }
    else
    {
      this.m_solutionDoesntContainsAndRadio.Checked = true;
      this.m_solutionDoesntContainsOperator = "AND";
    }
  }

  private void CUiMFSearchConstraintsDlg_Load(object sender, EventArgs e)
  {
    this.LoadObjectTypesFromXml();
    this.InitStyles();
    ((RowCol) ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Cols[0]).Style = ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles["ObjectTypeStyle"];
    ((RowCol) ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).Cols[0]).Style = ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles["ObjectTypeStyle"];
    this.InitGrids();
  }

  private void InitGrids()
  {
    for (int index1 = 0; index1 < this.m_searchConditionsContained.Count; ++index1)
    {
      CApMFSearchCondition mfSearchCondition = this.m_searchConditionsContained[index1] as CApMFSearchCondition;
      ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).SetData(index1 + 1, 0, (object) mfSearchCondition.ObjectType);
      this.UpdateAttributeColumn(this.m_solutionContainsConditionsGrid, index1 + 1);
      int index2 = this.m_objectTypes.IndexOf((object) mfSearchCondition.ObjectType);
      int index3 = ((ArrayList) this.m_attributes[index2]).IndexOf((object) mfSearchCondition.Attribute);
      string str = ((ArrayList) this.m_attributesDisplayNames[index2])[index3].ToString();
      ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).SetData(index1 + 1, 1, (object) str);
      this.UpdateOperatorColumn(this.m_solutionContainsConditionsGrid, index1 + 1);
      ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).SetData(index1 + 1, 2, (object) mfSearchCondition.OperatorStr);
      this.UpdateValueColumn(this.m_solutionContainsConditionsGrid, index1 + 1);
      ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).SetData(index1 + 1, 3, mfSearchCondition.Value);
    }
    for (int index4 = 0; index4 < this.m_searchConditionsNotContained.Count; ++index4)
    {
      CApMFSearchCondition mfSearchCondition = this.m_searchConditionsNotContained[index4] as CApMFSearchCondition;
      ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).SetData(index4 + 1, 0, (object) mfSearchCondition.ObjectType);
      this.UpdateAttributeColumn(this.m_solutionDoesntContainConditionsGrid, index4 + 1);
      int index5 = this.m_objectTypes.IndexOf((object) mfSearchCondition.ObjectType);
      int index6 = ((ArrayList) this.m_attributes[index5]).IndexOf((object) mfSearchCondition.Attribute);
      string str = ((ArrayList) this.m_attributesDisplayNames[index5])[index6].ToString();
      ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).SetData(index4 + 1, 1, (object) str);
      this.UpdateOperatorColumn(this.m_solutionDoesntContainConditionsGrid, index4 + 1);
      ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).SetData(index4 + 1, 2, (object) mfSearchCondition.OperatorStr);
      this.UpdateValueColumn(this.m_solutionDoesntContainConditionsGrid, index4 + 1);
      ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).SetData(index4 + 1, 3, mfSearchCondition.Value);
    }
  }

  private void InitStyles()
  {
    ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles.Add("StringValueStyle").DataType = typeof (string);
    ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles.Add("NumberValueStyle").DataType = typeof (double);
    ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles.Add("DateValueStyle").DataType = typeof (DateTime);
    ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles.Add("NumberOperatorStyle").ComboList = "=|>|<|>=|<=";
    ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles.Add("StringOperatorStyle").ComboList = "equals|contains";
    ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles.Add("DateOperatorStyle").ComboList = "=|>|<|>=|<=";
    CellStyle cellStyle1 = ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles.Add("ObjectTypeStyle");
    cellStyle1.ComboList = " ";
    foreach (string objectType in this.m_objectTypes)
    {
      cellStyle1.ComboList += "|";
      cellStyle1.ComboList += objectType;
    }
    for (int index = 0; index < this.m_objectTypes.Count; ++index)
    {
      CellStyle cellStyle2 = ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles.Add(this.m_objectTypes[index].ToString());
      cellStyle2.ComboList = "";
      foreach (string str in this.m_attributesDisplayNames[index] as ArrayList)
      {
        cellStyle2.ComboList += str;
        cellStyle2.ComboList += "|";
      }
    }
    ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).SelectionMode = (SelectionModeEnum) 1;
    ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).SelectionMode = (SelectionModeEnum) 1;
  }

  private void LoadObjectTypesFromXml()
  {
    XmlDocument doc = new XmlDocument();
    this.GetXMLDoc(ref doc);
    XmlNodeList elementsByTagName = doc.GetElementsByTagName("ModularFixture");
    bool flag1 = elementsByTagName != null && elementsByTagName.Count > 0;
    TxPlanningTypeMetaData planningTypeMetaData = (TxPlanningTypeMetaData) null;
    TxEmsGlobalServicesProvider servicesProvider = TxApplication.ActiveDocument.PlatformGlobalServicesProvider as TxEmsGlobalServicesProvider;
    for (int index = 0; index < elementsByTagName.Count & flag1; ++index)
    {
      XmlNodeList childNodes1 = elementsByTagName.Item(index).ChildNodes;
      if (childNodes1 != null && childNodes1.Count > 0)
      {
        foreach (XmlNode xmlNode1 in childNodes1)
        {
          if (xmlNode1.Name.ToLower() == "object")
          {
            if (xmlNode1.Attributes.Item(0).Name.ToLower() == "name")
            {
              planningTypeMetaData = servicesProvider.GetTypeMetaData(xmlNode1.Attributes.Item(0).Value);
              if (planningTypeMetaData == null)
                continue;
            }
            if (xmlNode1.Attributes.Item(1).Name.ToLower() == "displayname")
              this.m_objectTypes.Add((object) xmlNode1.Attributes.Item(1).Value);
            XmlNodeList childNodes2 = xmlNode1.ChildNodes;
            if (childNodes2 != null && childNodes2.Count > 0)
            {
              this.m_attributes.Add((object) new ArrayList());
              this.m_attributesTypes.Add((object) new ArrayList());
              this.m_attributesDisplayNames.Add((object) new ArrayList());
              foreach (XmlNode xmlNode2 in childNodes2)
              {
                if (xmlNode2.Name.ToLower() == "attribute")
                {
                  if (xmlNode2.Attributes.Item(0).Name.ToLower() == "name")
                  {
                    bool flag2 = false;
                    foreach (TxPlanningTypeFieldData allField in planningTypeMetaData.AllFields)
                    {
                      if (allField.Name == xmlNode2.Attributes.Item(0).Value)
                      {
                        flag2 = true;
                        break;
                      }
                    }
                    if (flag2)
                      ((ArrayList) this.m_attributes[this.m_attributes.Count - 1]).Add((object) xmlNode2.Attributes.Item(0).Value);
                    else
                      continue;
                  }
                  if (xmlNode2.Attributes.Item(1).Name.ToLower() == "displayname")
                    ((ArrayList) this.m_attributesDisplayNames[this.m_attributes.Count - 1]).Add((object) xmlNode2.Attributes.Item(1).Value);
                  if (xmlNode2.Attributes.Item(2).Name.ToLower() == "type")
                    ((ArrayList) this.m_attributesTypes[this.m_attributesTypes.Count - 1]).Add((object) xmlNode2.Attributes.Item(2).Value.ToLower());
                }
              }
            }
          }
        }
      }
    }
  }

  private void GetXMLDoc(ref XmlDocument doc)
  {
    string filename = Path.Combine(TxApplicationEx.SysRootAppDataPath() + "\\ModularFixture\\", "MFSearchFields.xml");
    doc.Load(filename);
  }

  private void m_solutionContainsConditionsGrid_BeforeEdit(object sender, RowColEventArgs e)
  {
    if (this.CheckBeforeEdit(this.m_solutionContainsConditionsGrid, e.Row, e.Col))
      return;
    e.Cancel = true;
  }

  private void m_solutionContainsConditionsGrid_AfterEdit(object sender, RowColEventArgs e)
  {
    this.UpdateGridAfterUpdate(this.m_solutionContainsConditionsGrid, e.Row, e.Col);
  }

  private void m_solutionDoesntContainConditionsGrid_BeforeEdit(object sender, RowColEventArgs e)
  {
    if (this.CheckBeforeEdit(this.m_solutionDoesntContainConditionsGrid, e.Row, e.Col))
      return;
    e.Cancel = true;
  }

  private bool CheckBeforeEdit(TxFlexGrid grid, int rowIndex, int colIndex)
  {
    bool flag = true;
    object data1 = ((C1FlexGridBase) grid).GetData(rowIndex, 0);
    object data2 = ((C1FlexGridBase) grid).GetData(rowIndex, 1);
    object data3 = ((C1FlexGridBase) grid).GetData(rowIndex, 2);
    if (colIndex == 1 && (data1 == null || data1.ToString().TrimEnd() == ""))
      flag = false;
    else if (colIndex == 2 && (data2 == null || data2.ToString().TrimEnd() == ""))
      flag = false;
    else if (colIndex == 3 && (data3 == null || data3.ToString().TrimEnd() == ""))
      flag = false;
    return flag;
  }

  private void m_solutionDoesntContainConditionsGrid_AfterEdit(object sender, RowColEventArgs e)
  {
    this.UpdateGridAfterUpdate(this.m_solutionDoesntContainConditionsGrid, e.Row, e.Col);
  }

  private void UpdateGridAfterUpdate(TxFlexGrid grid, int row, int col)
  {
    switch (col)
    {
      case 0:
        if (((C1FlexGridBase) grid).GetData(row, col).ToString().TrimEnd() != "")
        {
          this.UpdateAttributeColumn(grid, row);
          break;
        }
        ((C1FlexGridBase) grid).SetData(row, 1, (object) null);
        ((C1FlexGridBase) grid).SetCellStyle(row, 1, ((C1FlexGridBase) grid).Styles["Normal"]);
        ((C1FlexGridBase) grid).SetData(row, 2, (object) null);
        ((C1FlexGridBase) grid).SetCellStyle(row, 2, ((C1FlexGridBase) grid).Styles["Normal"]);
        ((C1FlexGridBase) grid).SetData(row, 3, (object) null);
        ((C1FlexGridBase) grid).SetCellStyle(row, 3, ((C1FlexGridBase) grid).Styles["Normal"]);
        break;
      case 1:
        if (((C1FlexGridBase) grid).GetData(row, col).ToString() != "")
        {
          this.UpdateOperatorColumn(grid, row);
          break;
        }
        ((C1FlexGridBase) grid).SetData(row, 2, (object) null);
        ((C1FlexGridBase) grid).SetCellStyle(row, 2, ((C1FlexGridBase) grid).Styles["Normal"]);
        ((C1FlexGridBase) grid).SetData(row, 3, (object) null);
        ((C1FlexGridBase) grid).SetCellStyle(row, 3, ((C1FlexGridBase) grid).Styles["Normal"]);
        break;
      case 2:
        if (((C1FlexGridBase) grid).GetData(row, col).ToString() != "")
        {
          this.UpdateValueColumn(grid, row);
          break;
        }
        ((C1FlexGridBase) grid).SetData(row, 3, (object) null);
        ((C1FlexGridBase) grid).SetCellStyle(row, 3, ((C1FlexGridBase) grid).Styles["Normal"]);
        break;
    }
  }

  private void UpdateAttributeColumn(TxFlexGrid grid, int rowIndex)
  {
    ((C1FlexGridBase) grid).SetData(rowIndex, 1, (object) null);
    ((C1FlexGridBase) grid).SetCellStyle(rowIndex, 1, ((C1FlexGridBase) grid).Styles["Normal"]);
    ((C1FlexGridBase) grid).SetData(rowIndex, 2, (object) null);
    ((C1FlexGridBase) grid).SetCellStyle(rowIndex, 2, ((C1FlexGridBase) grid).Styles["Normal"]);
    ((C1FlexGridBase) grid).SetData(rowIndex, 3, (object) null);
    ((C1FlexGridBase) grid).SetCellStyle(rowIndex, 3, ((C1FlexGridBase) grid).Styles["Normal"]);
    string str = ((C1FlexGridBase) grid).GetData(rowIndex, 0).ToString();
    ((C1FlexGridBase) grid).SetCellStyle(rowIndex, 1, ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles[str]);
  }

  private void UpdateOperatorColumn(TxFlexGrid grid, int rowIndex)
  {
    ((C1FlexGridBase) grid).SetData(rowIndex, 2, (object) null);
    ((C1FlexGridBase) grid).SetCellStyle(rowIndex, 2, ((C1FlexGridBase) grid).Styles["Normal"]);
    ((C1FlexGridBase) grid).SetData(rowIndex, 3, (object) null);
    ((C1FlexGridBase) grid).SetCellStyle(rowIndex, 3, ((C1FlexGridBase) grid).Styles["Normal"]);
    string str1 = ((C1FlexGridBase) grid).GetData(rowIndex, 0).ToString();
    string str2 = ((C1FlexGridBase) grid).GetData(rowIndex, 1).ToString();
    int index1 = this.m_objectTypes.IndexOf((object) str1);
    int index2 = ((ArrayList) this.m_attributesDisplayNames[index1]).IndexOf((object) str2);
    if (((ArrayList) this.m_attributesTypes[index1])[index2].ToString().ToLower() == "string")
      ((C1FlexGridBase) grid).SetCellStyle(rowIndex, 2, ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles["StringOperatorStyle"]);
    if (((ArrayList) this.m_attributesTypes[index1])[index2].ToString().ToLower() == "number")
      ((C1FlexGridBase) grid).SetCellStyle(rowIndex, 2, ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles["NumberOperatorStyle"]);
    if (!(((ArrayList) this.m_attributesTypes[index1])[index2].ToString().ToLower() == "date"))
      return;
    ((C1FlexGridBase) grid).SetCellStyle(rowIndex, 2, ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles["DateOperatorStyle"]);
  }

  private void UpdateValueColumn(TxFlexGrid grid, int rowIndex)
  {
    string str1 = ((C1FlexGridBase) grid).GetData(rowIndex, 0).ToString();
    string str2 = ((C1FlexGridBase) grid).GetData(rowIndex, 1).ToString();
    int index1 = this.m_objectTypes.IndexOf((object) str1);
    int index2 = ((ArrayList) this.m_attributesDisplayNames[index1]).IndexOf((object) str2);
    if (((ArrayList) this.m_attributesTypes[index1])[index2].ToString().ToLower() == "string")
      ((C1FlexGridBase) grid).SetCellStyle(rowIndex, 3, ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles["StringValueStyle"]);
    if (((ArrayList) this.m_attributesTypes[index1])[index2].ToString().ToLower() == "number")
      ((C1FlexGridBase) grid).SetCellStyle(rowIndex, 3, ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles["NumberValueStyle"]);
    if (!(((ArrayList) this.m_attributesTypes[index1])[index2].ToString().ToLower() == "date"))
      return;
    ((C1FlexGridBase) grid).SetCellStyle(rowIndex, 3, ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Styles["DateValueStyle"]);
  }

  private void m_ok_Click(object sender, EventArgs e)
  {
    this.m_searchConditionsContained.Clear();
    for (int i = 1; i < ((RowColCollection) ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Rows).Count; ++i)
    {
      if (this.IsValidCondition(i, this.m_solutionContainsConditionsGrid))
      {
        string objectType = ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).GetData(i, 0).ToString();
        string str = ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).GetData(i, 1).ToString();
        string operatorStr = ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).GetData(i, 2).ToString();
        object data = ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).GetData(i, 3);
        int index1 = this.m_objectTypes.IndexOf((object) objectType);
        int index2 = ((ArrayList) this.m_attributesDisplayNames[index1]).IndexOf((object) str);
        string attribute = ((ArrayList) this.m_attributes[index1])[index2].ToString();
        string attributeType = ((ArrayList) this.m_attributesTypes[index1])[index2].ToString();
        this.m_searchConditionsContained.Add((object) new CApMFSearchCondition(objectType, attribute, attributeType, operatorStr, data));
      }
    }
    this.m_searchConditionsNotContained.Clear();
    for (int i = 1; i < ((RowColCollection) ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).Rows).Count; ++i)
    {
      if (this.IsValidCondition(i, this.m_solutionDoesntContainConditionsGrid))
      {
        string objectType = ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).GetData(i, 0).ToString();
        string str1 = ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).GetData(i, 1).ToString();
        string operatorStr = ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).GetData(i, 2).ToString();
        string str2 = ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).GetData(i, 3).ToString();
        int index3 = this.m_objectTypes.IndexOf((object) objectType);
        int index4 = ((ArrayList) this.m_attributesDisplayNames[index3]).IndexOf((object) str1);
        string attribute = ((ArrayList) this.m_attributes[index3])[index4].ToString();
        string attributeType = ((ArrayList) this.m_attributesTypes[index3])[index4].ToString();
        this.m_searchConditionsNotContained.Add((object) new CApMFSearchCondition(objectType, attribute, attributeType, operatorStr, (object) str2));
      }
    }
    this.m_solutionContainsOperator = !this.m_solutionContainsOrRadio.Checked ? "AND" : "OR";
    this.m_solutionDoesntContainsOperator = !this.m_solutionDoesntContainsOrRadio.Checked ? "AND" : "OR";
    ((Form) this).Close();
  }

  private void m_cancel_Click(object sender, EventArgs e) => ((Form) this).Close();

  private bool IsValidCondition(int i, TxFlexGrid grid)
  {
    return (((C1FlexGridBase) grid).GetData(i, 0) != null && ((C1FlexGridBase) grid).GetData(i, 0).ToString() != "") & (((C1FlexGridBase) grid).GetData(i, 1) != null && ((C1FlexGridBase) grid).GetData(i, 1).ToString() != "") & (((C1FlexGridBase) grid).GetData(i, 2) != null && ((C1FlexGridBase) grid).GetData(i, 2).ToString() != "") & (((C1FlexGridBase) grid).GetData(i, 3) != null && ((C1FlexGridBase) grid).GetData(i, 3).ToString() != "");
  }

  internal string SolutionContainsOperator => this.m_solutionContainsOperator;

  internal string SolutionDoesntContainOperator => this.m_solutionDoesntContainsOperator;

  protected virtual void Dispose(bool disposing)
  {
    if (disposing && this.components != null)
      this.components.Dispose();
    base.Dispose(disposing);
  }

  private void InitializeComponent()
  {
    ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (CUiMFSearchConstraintsDlg));
    this.groupBox1 = new GroupBox();
    this.m_solutionContainsConditionsGrid = new TxFlexGrid();
    this.m_solutionContainsAndRadio = new RadioButton();
    this.m_solutionContainsOrRadio = new RadioButton();
    this.label1 = new Label();
    this.groupBox2 = new GroupBox();
    this.m_solutionDoesntContainConditionsGrid = new TxFlexGrid();
    this.m_solutionDoesntContainsAndRadio = new RadioButton();
    this.label2 = new Label();
    this.m_solutionDoesntContainsOrRadio = new RadioButton();
    this.m_ok = new Button();
    this.m_cancel = new Button();
    this.groupBox1.SuspendLayout();
    ((ISupportInitialize) this.m_solutionContainsConditionsGrid).BeginInit();
    this.groupBox2.SuspendLayout();
    ((ISupportInitialize) this.m_solutionDoesntContainConditionsGrid).BeginInit();
    ((Control) this).SuspendLayout();
    this.groupBox1.Controls.Add((Control) this.m_solutionContainsConditionsGrid);
    this.groupBox1.Controls.Add((Control) this.m_solutionContainsAndRadio);
    this.groupBox1.Controls.Add((Control) this.m_solutionContainsOrRadio);
    this.groupBox1.Controls.Add((Control) this.label1);
    this.groupBox1.Location = new Point(12, 12);
    this.groupBox1.Name = "groupBox1";
    this.groupBox1.Size = new Size(465, 156);
    this.groupBox1.TabIndex = 0;
    this.groupBox1.TabStop = false;
    this.groupBox1.Text = "Solution Contains:";
    ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).ColumnInfo = componentResourceManager.GetString("m_solutionContainsConditionsGrid.ColumnInfo");
    ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).ExtendLastCol = true;
    ((Control) this.m_solutionContainsConditionsGrid).Location = new Point(9, 43);
    ((Control) this.m_solutionContainsConditionsGrid).Name = "m_solutionContainsConditionsGrid";
    ((RowColCollection) ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).Rows).Count = 10;
    ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).ShowButtons = (ShowButtonsEnum) 2;
    ((Control) this.m_solutionContainsConditionsGrid).Size = new Size(450, 107);
    ((Control) this.m_solutionContainsConditionsGrid).TabIndex = 6;
    ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).AfterEdit += new RowColEventHandler(this.m_solutionContainsConditionsGrid_AfterEdit);
    ((C1FlexGridBase) this.m_solutionContainsConditionsGrid).BeforeEdit += new RowColEventHandler(this.m_solutionContainsConditionsGrid_BeforeEdit);
    this.m_solutionContainsAndRadio.AutoSize = true;
    this.m_solutionContainsAndRadio.Location = new Point(169, 20);
    this.m_solutionContainsAndRadio.Name = "m_solutionContainsAndRadio";
    this.m_solutionContainsAndRadio.Size = new Size(48 /*0x30*/, 17);
    this.m_solutionContainsAndRadio.TabIndex = 2;
    this.m_solutionContainsAndRadio.TabStop = true;
    this.m_solutionContainsAndRadio.Text = "AND";
    this.m_solutionContainsAndRadio.UseVisualStyleBackColor = true;
    this.m_solutionContainsOrRadio.AutoSize = true;
    this.m_solutionContainsOrRadio.Location = new Point(113, 20);
    this.m_solutionContainsOrRadio.Name = "m_solutionContainsOrRadio";
    this.m_solutionContainsOrRadio.Size = new Size(41, 17);
    this.m_solutionContainsOrRadio.TabIndex = 1;
    this.m_solutionContainsOrRadio.TabStop = true;
    this.m_solutionContainsOrRadio.Text = "OR";
    this.m_solutionContainsOrRadio.UseVisualStyleBackColor = true;
    this.label1.AutoSize = true;
    this.label1.Location = new Point(6, 22);
    this.label1.Name = "label1";
    this.label1.Size = new Size(96 /*0x60*/, 13);
    this.label1.TabIndex = 0;
    this.label1.Text = "Condition operator:";
    this.groupBox2.Controls.Add((Control) this.m_solutionDoesntContainConditionsGrid);
    this.groupBox2.Controls.Add((Control) this.m_solutionDoesntContainsAndRadio);
    this.groupBox2.Controls.Add((Control) this.label2);
    this.groupBox2.Controls.Add((Control) this.m_solutionDoesntContainsOrRadio);
    this.groupBox2.Location = new Point(12, 174);
    this.groupBox2.Name = "groupBox2";
    this.groupBox2.Size = new Size(465, 156);
    this.groupBox2.TabIndex = 1;
    this.groupBox2.TabStop = false;
    this.groupBox2.Text = "Solution Doesn't Contain";
    ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).ColumnInfo = componentResourceManager.GetString("m_solutionDoesntContainConditionsGrid.ColumnInfo");
    ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).ExtendLastCol = true;
    ((Control) this.m_solutionDoesntContainConditionsGrid).Location = new Point(9, 43);
    ((Control) this.m_solutionDoesntContainConditionsGrid).Name = "m_solutionDoesntContainConditionsGrid";
    ((RowColCollection) ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).Rows).Count = 10;
    ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).ShowButtons = (ShowButtonsEnum) 2;
    ((Control) this.m_solutionDoesntContainConditionsGrid).Size = new Size(450, 107);
    ((Control) this.m_solutionDoesntContainConditionsGrid).TabIndex = 5;
    ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).AfterEdit += new RowColEventHandler(this.m_solutionDoesntContainConditionsGrid_AfterEdit);
    ((C1FlexGridBase) this.m_solutionDoesntContainConditionsGrid).BeforeEdit += new RowColEventHandler(this.m_solutionDoesntContainConditionsGrid_BeforeEdit);
    this.m_solutionDoesntContainsAndRadio.AutoSize = true;
    this.m_solutionDoesntContainsAndRadio.Location = new Point(169, 20);
    this.m_solutionDoesntContainsAndRadio.Name = "m_solutionDoesntContainsAndRadio";
    this.m_solutionDoesntContainsAndRadio.Size = new Size(48 /*0x30*/, 17);
    this.m_solutionDoesntContainsAndRadio.TabIndex = 4;
    this.m_solutionDoesntContainsAndRadio.TabStop = true;
    this.m_solutionDoesntContainsAndRadio.Text = "AND";
    this.m_solutionDoesntContainsAndRadio.UseVisualStyleBackColor = true;
    this.label2.AutoSize = true;
    this.label2.Location = new Point(6, 22);
    this.label2.Name = "label2";
    this.label2.Size = new Size(96 /*0x60*/, 13);
    this.label2.TabIndex = 1;
    this.label2.Text = "Condition operator:";
    this.m_solutionDoesntContainsOrRadio.AutoSize = true;
    this.m_solutionDoesntContainsOrRadio.Location = new Point(113, 20);
    this.m_solutionDoesntContainsOrRadio.Name = "m_solutionDoesntContainsOrRadio";
    this.m_solutionDoesntContainsOrRadio.Size = new Size(41, 17);
    this.m_solutionDoesntContainsOrRadio.TabIndex = 3;
    this.m_solutionDoesntContainsOrRadio.TabStop = true;
    this.m_solutionDoesntContainsOrRadio.Text = "OR";
    this.m_solutionDoesntContainsOrRadio.UseVisualStyleBackColor = true;
    this.m_ok.Location = new Point(321, 345);
    this.m_ok.Name = "m_ok";
    this.m_ok.Size = new Size(75, 23);
    this.m_ok.TabIndex = 2;
    this.m_ok.Text = "OK";
    this.m_ok.UseVisualStyleBackColor = true;
    this.m_ok.Click += new EventHandler(this.m_ok_Click);
    this.m_cancel.Location = new Point(402, 345);
    this.m_cancel.Name = "m_cancel";
    this.m_cancel.Size = new Size(75, 23);
    this.m_cancel.TabIndex = 3;
    this.m_cancel.Text = "Cancel";
    this.m_cancel.UseVisualStyleBackColor = true;
    this.m_cancel.Click += new EventHandler(this.m_cancel_Click);
    ((ContainerControl) this).AutoScaleDimensions = new SizeF(6f, 13f);
    ((ContainerControl) this).AutoScaleMode = AutoScaleMode.Font;
    ((Form) this).ClientSize = new Size(490, 383);
    ((Control) this).Controls.Add((Control) this.m_cancel);
    ((Control) this).Controls.Add((Control) this.m_ok);
    ((Control) this).Controls.Add((Control) this.groupBox2);
    ((Control) this).Controls.Add((Control) this.groupBox1);
    ((Form) this).FormBorderStyle = FormBorderStyle.FixedDialog;
    ((Form) this).Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
    ((Form) this).MaximizeBox = false;
    ((Control) this).Name = nameof (CUiMFSearchConstraintsDlg);
    ((Form) this).ShowIcon = false;
    ((Control) this).Text = "Search Conditions";
    ((Form) this).Load += new EventHandler(this.CUiMFSearchConstraintsDlg_Load);
    this.groupBox1.ResumeLayout(false);
    this.groupBox1.PerformLayout();
    ((ISupportInitialize) this.m_solutionContainsConditionsGrid).EndInit();
    this.groupBox2.ResumeLayout(false);
    this.groupBox2.PerformLayout();
    ((ISupportInitialize) this.m_solutionDoesntContainConditionsGrid).EndInit();
    ((Control) this).ResumeLayout(false);
  }
}
